package com.woniuxy.woniubook.mapper;

import com.woniuxy.woniubook.entity.Address;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wugd
 * @since 2022-11-16 02:13:10
 */
@Mapper
public interface AddressMapper extends BaseMapper<Address> {

    @Update("update t_address set isDefault = '0' where isDefault = '1' and userId = #{id}")
    int updateAddressByDefault(Long userId);

}
